How I start a web3 project

  1. Svelte starter: npx degit italypaleale/svelte-spa-router-template <some-name>
  2. Hardhat: npm i --save-dev hardhat && npx hardhat
  3. Install ethers: npm i ethers

Hardhat

  1. Start project with empty config
  2. Install all deps: npm install --save-dev @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers
  3. Create contracts/
  4. Replace config with:
        require("@nomiclabs/hardhat-waffle")
    
    task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
    const accounts = await hre.ethers.getSigners()
    
    for (const account of accounts) {
    console.log(account.address)
    }
    })
    
    /**
    * @type import('hardhat/config').HardhatUserConfig
    */
    module.exports = {
    solidity: "0.8.4",
    }